package com.feeyin.radar.crm.model;

import java.math.BigDecimal;
import java.util.Date;

import com.feeyin.radar.commons.DateUtils;

public class ContractDetail
{
  private Integer id;
  private Integer contractId;
  private String detailCode;
  private String purchaseDesc;
  private String unit;
  private BigDecimal price;
  private Integer num;
  private BigDecimal discount;
  private BigDecimal costs;
  private BigDecimal prossProfit;
  private Integer contractDetailId;
  private String isPrimitive;
  private String updateHistoryCode;
  private Integer salePersonId;
  private Date startDate;
  private String moreStatus;
  private Date endDate;
  //use for vo
  private String suffixCaseName;
  private String contractCaseName;
  private String caseCode;
  private String applicationCode;
  private String description;
  private String processName;
  private String mark;
  private String typeId;
  private String typeName;
  private Integer processId;
  private Integer processGroupId;
  private BigDecimal costValue;
  private BigDecimal officialCost;
  private BigDecimal operationCost;
  private BigDecimal proxyCost;
  private Long isSub;
  private String applicationDate;
  private Integer caseId; 
  private Long attachId;
  private String contractCode;
  private Integer currentStatusDay;
  private String applyName;
  private String saleName;
  private Integer processTime;
  private String caseMan;
  private String caseDate;
  private String liAnDate;
  private String tiJiaoDate;
  private Date modifyDate;
  private Integer deadLineLeft;
  private String deadLineDate;
  private Long hasSub;
  private Long applyPersonId;
  @Override
	public String toString() {
		// TODO Auto-generated method stub
		return "contractCaseName:"+contractCaseName+","+
		"caseCode:"+caseCode+","+
		"applicationCode:"+applicationCode+","+
		"description:"+description+","+
		"processName:"+processName+","+
		"mark:"+mark+","+
		"typeId:"+typeId+","+
		"processId:"+processId+","+
		"processGroupId:"+processGroupId+","+
		"costValue:"+costValue+","+
		"officialCost:"+officialCost+","+
		"operationCost:"+operationCost+","+
		"proxyCost:"+proxyCost+","+
		"isSub:"+isSub+","+
		"applicationDate:"+applicationDate+","+
		"caseId:"+caseId+
		"attachId:"+attachId;
	}
  public String getMoreStatus()
  {
    return this.moreStatus;
  }

  public void setMoreStatus(String moreStatus) {
    this.moreStatus = moreStatus;
  }

  public Integer getSalePersonId() {
    return this.salePersonId;
  }

  public void setSalePersonId(Integer salePersonId) {
    this.salePersonId = salePersonId;
  }

  public Date getStartDate() {
    return this.startDate;
  }

  public void setStartDate(Date startDate) {
    this.startDate = startDate;
  }

  public Date getEndDate() {
    return this.endDate;
  }

  public void setEndDate(Date endDate) {
    this.endDate = endDate;
  }

  public Integer getId()
  {
    return this.id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public Integer getContractId() {
    return this.contractId;
  }

  public void setContractId(Integer contractId) {
    this.contractId = contractId;
  }

  public String getDetailCode() {
    return this.detailCode;
  }

  public void setDetailCode(String detailCode) {
    this.detailCode = detailCode;
  }

  public String getPurchaseDesc() {
    return this.purchaseDesc;
  }

  public void setPurchaseDesc(String purchaseDesc) {
    this.purchaseDesc = purchaseDesc;
  }

  public String getUnit() {
    return this.unit;
  }

  public void setUnit(String unit) {
    this.unit = unit;
  }

  public BigDecimal getPrice() {
    return this.price;
  }

  public void setPrice(BigDecimal price) {
    this.price = price;
  }

  public Integer getNum() {
    return this.num;
  }

  public void setNum(Integer num) {
    this.num = num;
  }

  public BigDecimal getCostValue() {
    return this.costValue;
  }

  public void setCostValue(BigDecimal costValue) {
    this.costValue = costValue;
  }

  public BigDecimal getDiscount() {
    return this.discount;
  }

  public void setDiscount(BigDecimal discount) {
    this.discount = discount;
  }

  public BigDecimal getCosts() {
    return this.costs;
  }

  public void setCosts(BigDecimal costs) {
    this.costs = costs;
  }

  public BigDecimal getProssProfit() {
    return this.prossProfit;
  }

  public void setProssProfit(BigDecimal prossProfit) {
    this.prossProfit = prossProfit;
  }

  public String getIsPrimitive() {
    return this.isPrimitive;
  }

  public void setIsPrimitive(String isPrimitive) {
    this.isPrimitive = isPrimitive;
  }

  public Integer getContractDetailId() {
    return this.contractDetailId;
  }

  public void setContractDetailId(Integer contractDetailId) {
    this.contractDetailId = contractDetailId;
  }

  public String getUpdateHistoryCode() {
    return this.updateHistoryCode;
  }

  public void setUpdateHistoryCode(String updateHistoryCode) {
    this.updateHistoryCode = updateHistoryCode;
  }

public String getSuffixCaseName() {
	return suffixCaseName;
}

public void setSuffixCaseName(String suffixCaseName) {
	this.suffixCaseName = suffixCaseName;
}

public String getContractCaseName() {
	return contractCaseName;
}

public void setContractCaseName(String contractCaseName) {
	this.contractCaseName = contractCaseName;
}

public String getCaseCode() {
	return caseCode;
}

public void setCaseCode(String caseCode) {
	this.caseCode = caseCode;
}

public String getApplicationCode() {
	return applicationCode;
}

public void setApplicationCode(String applicationCode) {
	this.applicationCode = applicationCode;
}

public String getDescription() {
	return description;
}

public void setDescription(String description) {
	this.description = description;
}

public String getProcessName() {
	return processName;
}

public void setProcessName(String processName) {
	this.processName = processName;
}

public String getMark() {
	return mark;
}

public void setMark(String mark) {
	this.mark = mark;
}

public String getTypeId() {
	return typeId;
}

public void setTypeId(String typeId) {
	this.typeId = typeId;
}

public Integer getProcessId() {
	return processId;
}

public void setProcessId(Integer processId) {
	this.processId = processId;
}

public Integer getProcessGroupId() {
	return processGroupId;
}

public void setProcessGroupId(Integer processGroupId) {
	this.processGroupId = processGroupId;
}

public BigDecimal getOfficialCost() {
	return officialCost;
}

public void setOfficialCost(BigDecimal officialCost) {
	this.officialCost = officialCost;
}

public BigDecimal getOperationCost() {
	return operationCost;
}

public void setOperationCost(BigDecimal operationCost) {
	this.operationCost = operationCost;
}

public BigDecimal getProxyCost() {
	return proxyCost;
}

public void setProxyCost(BigDecimal proxyCost) {
	this.proxyCost = proxyCost;
}

public Long getIsSub() {
	return isSub;
}

public void setIsSub(Long isSub) {
	this.isSub = isSub;
}
public String getApplicationDate() {
	return applicationDate;
}
public void setApplicationDate(String applicationDate) {
	this.applicationDate = applicationDate;
}
public Integer getCaseId() {
	return caseId;
}
public void setCaseId(Integer caseId) {
	this.caseId = caseId;
}
public Long getAttachId() {
	return attachId;
}
public void setAttachId(Long attachId) {
	this.attachId = attachId;
}
public String getContractCode() {
	return contractCode;
}
public void setContractCode(String contractCode) {
	this.contractCode = contractCode;
}
public Integer getCurrentStatusDay() {
	if(isSub==1L)
		return null;
	currentStatusDay = DateUtils.getIntervalDate(modifyDate, new Date());
	return currentStatusDay;
}
public void setCurrentStatusDay(Integer currentStatusDay) {
	this.currentStatusDay = currentStatusDay;
}
public String getApplyName() {
	return applyName;
}
public void setApplyName(String applyName) {
	this.applyName = applyName;
}
public String getSaleName() {
	return saleName;
}
public void setSaleName(String saleName) {
	this.saleName = saleName;
}
public Integer getProcessTime() {
	return processTime;
}
public void setProcessTime(Integer processTime) {
	this.processTime = processTime;
}
public String getCaseMan() {
	caseMan=applyName;
	return caseMan;
}
public void setCaseMan(String caseMan) {
	this.caseMan = caseMan;
}
public Date getModifyDate() {
	return modifyDate;
}
public void setModifyDate(Date modifyDate) {
	this.modifyDate = modifyDate;
}
public Integer getDeadLineLeft() {
	if(isSub==1L)
		return null;
	deadLineLeft = DateUtils.getIntervalDate(new Date(), DateUtils.stringDateConvertDate(getDeadLineDate(), "yyyy-MM-dd"));
	return deadLineLeft;
}
public void setDeadLineLeft(Integer deadLineLeft) {
	this.deadLineLeft = deadLineLeft;
}
public Long getHasSub() {
	return hasSub;
}
public void setHasSub(Long hasSub) {
	this.hasSub = hasSub;
}
public Long getApplyPersonId() {
	return applyPersonId;
}
public void setApplyPersonId(Long applyPersonId) {
	this.applyPersonId = applyPersonId;
}
public String getTypeName() {
	return typeName;
}
public void setTypeName(String typeName) {
	this.typeName = typeName;
}
public String getCaseDate() {
	caseDate = applicationDate;
	return caseDate;
}
public void setCaseDate(String caseDate) {
	this.caseDate = caseDate;
}
public String getLiAnDate() {
	liAnDate=applicationDate;
	return liAnDate;
}
public void setLiAnDate(String liAnDate) {
	this.liAnDate = liAnDate;
}
public String getTiJiaoDate() {
	tiJiaoDate = applicationDate;
	return tiJiaoDate;
}
public void setTiJiaoDate(String tiJiaoDate) {
	this.tiJiaoDate = tiJiaoDate;
}
public String getDeadLineDate() {
	Date finalDate = DateUtils.getDateAddDay(modifyDate, processTime);
	deadLineDate = DateUtils.getStringDateByFormat(finalDate, "yyyy-MM-dd");
	return deadLineDate;
}
public void setDeadLineDate(String deadLineDate) {
	
	this.deadLineDate = deadLineDate;
}
}